package com.company.project.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.company.project.common.utils.EnumAreaType;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 团队表
 *
 * @author ls
 * @email *****@mail.com
 * @date 2021-02-02 20:34:19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("match_team")
public class MatchTeamEntity extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 团队ID
	 */
	@TableId("team_id")
	private String teamId;

	/**
	 * 团队名
	 */
	@TableField("team_name")
	private String teamName;

	/**
	 * 团队介绍
	 */
	@TableField("team_brief")
	private String teamBrief;
	
	/**
	 * 初赛参赛赛区
	 */
	@TableField("area")
	private String area;	

	@TableField(exist = false)
	private String areaName;
	
	/**
	 * 团队合照
	 */
	@TableField("pic")
	private String pic;

	/**
	 * 文件名
	 */
	@TableField("pic_name")
	private String picName;

	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;

	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;

	public String getAreaName() {
		return EnumAreaType.getName(area);
	}

}
